import { stringify } from 'qs';
import request from '@/utils/requestnodva';

// mock 获取视频分组
// export async function GetVideoGroup() {
//   return request(`/${window.storeId}/api/GetVideoGroup`);
// }
// mock 获取视频列表
// export async function GetVideoList(params) {
//   return request(`/${window.storeId}/api/GetVideoList?${stringify(params)}`);
// }

// 获取视频分组
export async function GetVideoGroup(params,callback) {
    return request(`/${window.storeId}/VideoCenter/GetVideoCategory?${stringify(params)}`, {}, callback);
}
// 获取视频列表(视频插件)
export async function GetVideoList(params,callback) {
    return request(`/${window.storeId}/VideoCenter/GetVideoList?${stringify(params)}`,{},callback);
}
// 上传视频
export async function GetVideoStsConfig(params, callback) {
    return request(`/${window.storeId}/VideoCenter/GetVideoStsConfig?${stringify(params)}`, {}, callback);
}
// 上传视频
export async function SaveVideo(params, callback) {
    return request(`/${window.storeId}/VideoCenter/SaveVideo`, {
        method: 'POST',
        body: {
            ...params
        },
    }, callback);
}
